<?php
	$starttime = microtime();

function calculateEqTemp()
{
	
}
function printMain()
{

include("../wetterIncludes/unwetterzentrale.inc.php");
include("../wetterIncludes/unimuensterwetter.inc.php");

include("../wetterIncludes/wetteronline.inc.php");





    ?>
    <div id="sidebar">
    
    <h1>Messdaten</h1>
    
    <?php
    if ($error) {
    	    include_once("../wetterIncludes/bukkwetter.inc.php");



$item[4] = $item[6]; //WInd
$item[6] = $item[2];  //Druck

//$item[4]  = str_replace("km/h", "km/h ",$item[4]  );
$item[3] = $item[1].""; //Feuchte

$item[2] = strip_tags(htmlentities($item[0]))." "; //TEmp
$item[2]  = substr($item[2],0,-9);  		// Temperatur




   }
    
        ?>

    <b>Gemessen:</b> <? echo "Vor ". $diff/60 . " Minuten";
    ?><br />

    <b>Wind:</b> <? echo $item[4] . "<br />";
    ?>
   
    <b>Sonnenaufgang:</b> <?echo    date_sunrise(time(), SUNFUNCS_RET_STRING, 51.9667, 7.63333, 90+5/6, date("O")/100),    " <br />";
    ?>
    <b>Sonnenuntergang:</b> <?echo     date_sunset(time(), SUNFUNCS_RET_STRING, 51.9667, 7.63333, 90+5/6, date("O")/100);
        include "../wetterIncludes/schnee.php" ;

    
    ?>
    <h1>Äquivalenttemperat.</h1>

            <canvas width="125" height="125"  id='chart_div'></canvas>
<div  style="position:relative; bottom:150px;left:0px; text-align:right;margin:0px;"><a class="info" onMouseOver="InfoBoxAnzeigen(event,-300,0);" onMouseOut="InfoBoxAusblenden();" href="javascript:void(0)">(?)</a>
</div>

    <h1>Webcam</h1>
    
    <div id="links">
    <div class="thumbnail" >
    <a href="http://klimacam.uni-muenster.de/cgi-bin/image.jpg?size=640x480">
    <img src="http://klimacam.uni-muenster.de/cgi-bin/image.jpg?size=640x480" alt="Picture" /></a>
    </div>
    </div>
    </div>
    <div id="main">
    
    <h1>Wetter aktuell</h1>
    <table border="0">
    <tr>
    <td><img src="images/temperatur.gif" alt="Picture" /></td>
    <td>     <? if (!$error) {?> <div class="largefont"><strong>Aktuell in M&uuml;nster: <?
        echo $unimuensterdaten?></strong><?
    } else 
    {

    include_once("../wetterIncludes/bukkwetter.inc.php");
    ?>
    <div class="largefont"><strong>Aktuell: <?
        echo $bukkdaten;?>


        </div>
                    
    	<div  style="position:relative; bottom:20px;left:30px; text-align:right;margin:0px;"><a class="info" onMouseOver="InfoBox2Anzeigen(event,-300,0);" onMouseOut="InfoBox2Ausblenden();" href="javascript:void(0)">(?)</a>
</div>
    <?
    }
    ?>
    
    <? if (!$error) echo"</div>"; ?></td>
    
    <?

?>

    </tr>
    </table>
          <script type='text/javascript'>


				// Draw the gauge using custom settings
				options = {
					value: <?php echo $thetae; ?>,
					label: '',
					unitsLabel: '' + String.fromCharCode(186),
					min: 0,
					max: 65,
					majorTicks: 4,
					minorTicks: 3, // small ticks inside each major tick
					greenFrom: 0,
					greenTo: 45,
					yellowFrom: 46,
					yellowTo: 48,
					redFrom: 49,
					redTo: 69,
					colorOfFill: [ '#fff', '#fff', '#fff', '#fff' ]
				};
				new Gauge( document.getElementById( 'chart_div' ),options );

    </script>

   <h1  style="vertical-align:middle">Vorhersage von <img  style="vertical-align:middle" src="http://www.atr24.de/uploads/RTEmagicC_icon_wetteronline.gif" alt="wetteronline" /></h1>
    
   <?php echo utf8_encode($article); ?>
    
    
    
    


        
	
					<h1>Vorhersagediagramm</h1>
					    <div style="overflow:scroll; width:700px;"><img src="http://www.krystof.eu/wetter/vorhersageDiagramm.php" border="0" alt="vorhersagegrafik" /></div>
					   
        
        
					    <h1>Regenradar</h1>
    
 <div class="regenradar">
 <object type="text/html" data="http://www.niederschlagsradar.de/Schneeradar-Deutschland.aspx?i=1" width="700" height="500">
</object>
 <? 
 // <img id="radar" src="http://www.krystof.eu/wetter/getRainradar.php" alt="" border="0" style=" position:absolute; z-index: 2;" /> 
 //<div class="pic"><img src="images/ajax-loader.gif"/></div>
  ?>


 </div>
        
   
    <h1>Unwettervorhersage NRW</h1>
    						    <div><? echo $warnungen; ?></div>
					    <div><img src="http://unwetterzentrale.spiegel.de/uwzkarten/nrwindex.png" width="420" height="420" border="0" alt="unwetterzentrale nrw karte" /></div>
    <h1>Langzeit-Vorhersage</h1>
    						    <div><? include("../wetterIncludes/wetteronline14.inc.php"); ?></div>

    
     </div>
    <?
}

function printLogin()
{
    ?>
    <form  method="post" action="index.php">
  <p>  This is a restricted area. Please identify yourself.</p>
    <p>Password<input type="password" name="password" style="border: 1px solid black;" /></p>
    <p><input id="submit" type="submit" name="submit" value="Login" style="border: 1px solid black;" /></p>
    </form>
    <?
}



?>